import React, { Component } from 'react';

import { Card, Button, message } from 'antd';
import './style.less';

export default class Message extends Component{

	showMessage = (type) => {
		message[type]("欢迎来到后台管理系统");
	}

	render() {
		return(
			<div>
				<Card title="全局提示框">
					<Button type="primary" onClick={()=>this.showMessage('success')}>success</Button>
					<Button type="primary" onClick={()=>this.showMessage('info')}>info</Button>
					<Button type="primary" onClick={()=>this.showMessage('warning')}>warning</Button>
					<Button type="primary" onClick={()=>this.showMessage('error')}>error</Button>
					<Button type="primary" onClick={()=>this.showMessage('loading')}>loading</Button>
				</Card>
			</div>
		);
	}
}